<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,height=device-height,inital-scale=1,maximum-scale=1.0,user-scalable=no">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no"/>
    <meta name="format-detection" content="email=no"/>
    <title>面对面注册</title>
    <link type="text/css" rel="stylesheet" href="css/common.css">
    <link type="text/css" rel="stylesheet" href="css/registration.css">
</head>
<body>
<div class="main">
    <ul>
        <li><input id="phone" type="number" value="" placeholder="请输入手机号"></li>
        <li><input id="password" type="password" value="" placeholder="请输入密码"></li>
        <li class="number3"><input id="code" type="text" value="" placeholder="请输入验证码"><button>获取验证码</button></li>
        <li><input id="invitationCode" type="number" value="" placeholder="请输入邀请码"></li>
        <li><button id="btn">立即注册</button></li>
    </ul>
</div>
</body>
<script type="text/javascript" src="js/jquery-3.2.1.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script>
    //获取手机验证码
    var code = getQueryString("invitationCode");
    $('#invitationCode').val(code);
    $('.number3 button').click(function(){
        var phone = $('#phone').val();
        $.ajax({
            url: "https://wallet.seshell.cn/api/AppSmsCode/getSmsCode",
            type: 'POST',
            data: {phone:phone,type:"signUp"},
            dataType: "json",
            success:function(data){
                alert(data.data)
            }
        })
    })
    /**
     *提交注册申请
     */
    $('#btn').click(function(){
        var phone = $('#phone').val();
        var password = $('#password').val();
        var code = $('#code').val();
        var invitationCode = $('#invitationCode').val();
        $.ajax({
            url: "https://wallet.seshell.cn/api/AppUser/signUp",
            type: 'POST',
            data: {phone:phone,password:password,code:code,invitationCode:invitationCode},
            dataType: "json",
            success:function(data){
                alert(data.data)
            }
        })
    })

</script>
</html>